import mockRequest from "@/utils/mockRequest"
const actions = {
  async getData(context) {
    const result = await mockRequest({
      url: "/home/list",
      method: "get",
    })
    if (result.code == 20000) {
      context.commit("GETDATA", result.data)
    }
  },
}
const mutations = {
  GETDATA(state, list) {
    state.list = list
  },
}
const state = {
  list: {},
}
const getters = {}

export default {
  namespaced: true,
  state,
  mutations,
  actions,
  getters,
}
